<template>
  <div class="layout-padding">
    <splitpanes horizontal>
      <pane size="50">
        <div class="layout-padding-auto layout-padding-view">
          <el-table :data="state.dataList" highlight-current-row v-loading="state.loading" border
            style="width: 100%; height: 100%" :cell-style="tableStyle.cellStyle" stripe
            :header-cell-style="tableStyle.headerCellStyle" ref="tableRef">
            <el-table-column :label="$t('bigMaterial.bigMaterialimmediatelyMsg')">
              <el-table-column :label="$t('bigMaterial.materialMsg')">
                <el-table-column prop="materialCode" :label="$t('bigMaterial.materialCode')" show-overflow-tooltip width="150" />
                <el-table-column prop="materialName" :label="$t('bigMaterial.materialName')" show-overflow-tooltip width="200" />
                <el-table-column prop="qty" :label="$t('bigMaterial.qty')" show-overflow-tooltip/>
                <el-table-column prop="prdUnit" :label="$t('bigMaterial.prdUnit')" show-overflow-tooltip/>
                <el-table-column prop="locationCode" :label="$t('bigMaterial.locationCode')" show-overflow-tooltip/>
                <el-table-column prop="locationName" :label="$t('bigMaterial.locationName')" show-overflow-tooltip/>
              </el-table-column>
              <el-table-column :label="$t('bigMaterial.instockMsg')">
                <el-table-column prop="produceEndTime" :label="$t('bigMaterial.produceEndTime')" show-overflow-tooltip/>
                <el-table-column prop="creationTime" :label="$t('bigMaterial.creationTime')" show-overflow-tooltip/>
                </el-table-column>
              
              </el-table-column>
            
          </el-table>
          <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
        </div>
      </pane>
      <pane size="50">
        <records ref="recordsRef" />
      </pane>
    </splitpanes>

  </div>
</template>
<script setup lang="ts">
import { useI18n } from 'vue-i18n';

const { t } = useI18n();
import {BasicTableProps, useTable} from "/@/hooks/table";
import { GetBigMaterialList } from '/@/api/platform/report/bigMaterial';
import records from "./records.vue";
import { useMessage } from '/@/hooks/message';
const state: BasicTableProps = reactive<BasicTableProps>({
  queryForm: {
  },
  pageList: GetBigMaterialList
})
const {
  getDataList,
  currentChangeHandle,
  sizeChangeHandle,
  tableStyle
} = useTable(state)
const recordsRef = ref();

</script>